You can store symlinks as symlinks (as opposed to a copy of the file/directory they point to) using the --symlinks
parameter of the standard zip
.
Assuming foo
is a directory containing symlinks:
zip --symlinks -r foo.zip foo/
Rar equivalent:
rar a -ol foo.rar foo/
tar
stores them as is by default.
tar czpvf foo.tgz foo/
Note that the symlink occupies almost no disk space by itself (just an inode). It’s just a kind of pointer in the filesystem, as you probably know.
Related Posts:
- How can I symlink a file in Linux? [closed]
- tar: Error is not recoverable: exiting now
- How do I deal with a filename that starts with the hyphen (-) character?
- Bash: No such file or directory?
- What’s a .sh file?
- Kill detached screen session [closed]
- How to get the url of the current svn repo?
- How to unmount a busy device
- How to unmount a busy device
- performing HTTP requests with cURL (using PROXY)
- No space left on device
- How to perform grep operation on all files in a directory?
- Amazon Linux: apt-get: command not found
- Pass a password to ssh in pure bash
- How can I exclude directories from grep -R?
- gcc: error: unrecognized command line option
- How to set proxy for wget?
- How to change permissions for a folder and its subfolders/files in one step
- Docker can’t connect to docker daemon
- Need a good hex editor for Linux
- Pseudo-terminal will not be allocated because stdin is not a terminal
- Directory Inode vs Regular File Inode
- How to cat <
> a file containing code? - Diff command along with Grep gives “Binary file (standard input) matches”
- can’t remove python pip
- How would I get a cron job to run every 30 minutes?
- How to automatically redirect HTTP to HTTPS on Apache servers?
- Trying to use bash on Windows and got no installed distributions message
- “Unable to find remote helper for ‘https'” during git clone
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Is there a “goto” statement in bash?
- How can I delete a user in linux when the system says its currently used in a process
- Command to change the default home directory of a user
- Post request with Wget?
- Read and write to binary files in C?
- Telnet [Unable to connect to remote host: Connection refused]
- Terminal Multiplexer for Microsoft Windows – Installers for GNU Screen or tmux
- Can’t remove a directory in Unix
- Is there an alternative sleep function in C to milliseconds?
- Gedit command not working in kali linux terminal
- Syntax error near unexpected token ‘then’
- Curl : connection refused
- How to install Android SDK on Ubuntu?
- C fopen vs open
- How can I use grep to show just filenames on Linux?
- Bash script prints “Command Not Found” on empty lines
- Why does “docker attach” hang?
- Bash export command
- How to edit gitignore file
- Retrieve last 100 lines logs
- What are various options / arguments for “./configure” in Linux
- Adding a new entry to the PATH variable in ZSH
- CronJob not running
- Delete .DS_STORE files in current folder and all subfolders from command line on Mac
- Can’t upload media to my Raspberry Pi WordPress server
- My WordPress is giving me an 403 error when saving post/draft with specific words
- Can scp copy directories recursively?
- Copying a large directory tree locally? cp or rsync?
- What are the functional differences between .profile .bash_profile and .bashrc
- Check if port is open or closed on a Linux server?
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- When does `cron.daily` run?
- How to run a command multiple times, using bash shell?
- How to reconnect to a disconnected ssh session
- What does a + mean at the end of the permissions from ls -l?
- Should I quit using Ifconfig?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- What version of RHEL am I using?
- Keeping a linux process running after I logout
- Force dig to resolve without using cache
- How do you make it obvious you are on a production system?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- Mount CIFS Host is down
- Colors in bash after piping through less?
- List of files installed from apt package
- How to copy a large number of files quickly between two servers
- Why does sudo command take long to execute?
- Allow SFTP but disallow SSH?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- How to display certain lines from a text file in Linux?
- Can you have more than one ~/.ssh/config file?
- How to force nginx to resolve DNS (of a dynamic hostname) everytime when doing proxy_pass?
- GPG does not have enough entropy
- Why don’t EC2 ubuntu images have swap?
- SSHFS mount that survives disconnect
- Temporarily ignore my `~/.ssh/known_hosts` file?
- How to get TX/RX bytes without ifconfig?
- Curl: disable certificate verification
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to apply a filter to real time output of `tail -f `?
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- Practical maximum open file descriptors (ulimit -n) for a high volume system
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- What is the debian-sys-maint MySQL user (and more)?