Tag Info

Hot answers tagged

6

Linux can read (and write) to many filesystems, including ntfs, which is likely how your windows partitions are formatted. Many OS installers (including Ubuntu apparently) will scan your disks for any partitions that Linux knows how to mount, and set those up to be mounted at boot, which is why you can access them.


6

Command Line Tools I use autojump myself and I also depend on many aliases for navigating at the command line, e.g.: alias b='cd -' alias c='cd ~/Dropbox/95_2014/work/code' alias d='~/Dropbox' alias lnk='cd ~/Dropnot/webs/rails_apps/linker' alias n='cd ~/Dropnot' alias play='cd ~/play/' alias q='cd ~/Dropbox/95_2014/work/code/ruby__rails/ruby/ruby_quiz' ...


5

As a brute force approach, assuming you have access to all user directories and that all users are using bash as their default shell, you could search through their history files: grep 'deletedfilename' /home/*/.bash_history Assuming they were deleted recently enough for the command to still be saved in the user's shell history, that will show you who ...


5

Personally, I have never understood the use of fully-fledged file managers. I deeply prefer to use coreutils for file management. As a result, my solution for this would be to suggest a directory management utility. There are a myriad of these, and I have never personally found a use for them so I can make no personal recommendation. But, below are a few ...


4

async is the opposite of sync, which is rarely used. async is the default, you don't need to specify that explicitely. The option sync means that all changes to the according filesystem are immediately flushed to disk; the respective write operations are being waited for. For mechanical drives that means a huge slow down since the system has to move the ...


3

Advisory locking is for processes that cooperate "peacefully". The kernel keeps track of the locks but doesn't enforce them - it's up to the applications to obey them. This way the kernel doesn't need to deal with situations like dead-locks. Mandatory locking was introduced in System V Unix, but it turns out that the design was not the brightest thing. ...


3

An easy way is to just create a directory in /tmp and use a symlink: mkdir /tmp/mine ln -s /tmp/mine /home/me/tmp You may want to chmod 700 /tmp/mine to keep it private. If you instead want to mount an actual separate tmpfs directory: mount -t tmpfs -o size=100M tmpfs /home/me/tmp You need root privileges to do this, but normal permissions rules apply ...


3

As for a GUI solution I use and suggest Thunar (it's of course available for other desktops too). It's fast, lightweight and stable, it's memory footprint is almost unnoticeable (~70 MiB on 30+ tabs on two separate windows). Some of its features include: Tab navigation. Drag/drop Bookmarks. Select files by pattern (Ctrl+S). Batch file and directory ...


3

for f in *.csv; do IFS= read -r line < "$f" && case $line in (*HEADER*) continue; esac printf >&2 'ERROR: Missing HEADER record for "%s"\n' "$f" mv -- "$f" "${f%.*}.head" done


3

On the surface, what you've suggested you've tried works for me. Example $ mkdir -p test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ./test/firefox `-- [drwxrwxr-x] ./test/src Make the symbolic link: $ ln -s test/src test/firefox $ tree --noreport -fp . `-- [drwxrwxr-x] ./test |-- [drwxrwxr-x] ...


2

If you're absolutely sure that the end of the last partition fits on the target drive, you can copy the drive wholesale. Don't use dd, which is slower (unless used with additional options, and not always even then) and more error-prone; simply use cat. cat /dev/sdc >/dev/sdz Replace /dev/sdz by the proper path to the drive that you want to overwrite. ...


2

while read -r line; do mkfs.ext4 "$line" done < <(df -k | grep 'media' | cut -d ' ' -f 1) The df command with the grep and cut pipes would give us the list of external hard drive mounts. For instance, the external hard disk will always get mounted automatically to /media in most of the systems. So, I am using df command to check the mounts of the ...


2

If it's possible they were moved, try to find them with locate - that would find them if they were moved a while ago, before last run of updatedb (typically daiy): locate --existing --basename 'foo.txt' or using short options: locate -eb 'foo.txt' If that does not find them, you could use the find command. Guess where it could be to choose a ...


1

The reason for EPERM (the permission denied error ) is here: drwxr-xr-x 5 www-data www-data 4096 juil. 30 13:47 . The directory where you are trying to create a file (in other words change contents of the directory-file) is writeable only for user www-data, which you are not. Either mark the directory as writeable for the group, change the user to ...


1

Using the @reboot cron keyword, this will execute the specified command once after the machine got booted every time. @reboot rm -rf /dev/tmp/*


1

The standard command-line, indexed file search is locate. The index can be updated with updatedb. Most Linux systems have these tools configured by default (where updatedb is set up as a nightly cron job). The index only stores file paths. It doesn't do any advanced indexing like file type, modified date, etc. but for many simple purposes it is ...


1

Are you familiar with Vim? If yes, then have a look at Ranger. It's a very fast text-based file manager, and uses Vim-like shortcuts. Move around with hjkl. To bookmark current directory, press m, then the key to store the bookmark under. To access the bookmark, press ', then the key you bookmarked it under. To create a directory simply type :mkdir ...


1

Ubuntu is capable of reading and writing files stored on Windows formatted partitions. These partitions are normally formatted with NTFS, but are sometimes formatted with FAT32. You will also see FAT16 on other devices. General Considerations Ubuntu will show files and folders in NTFS/FAT32 filesystems which are hidden in Windows. Consequently, important ...


1

From Wikipedia Buffers are also flushed when filesystems are unmounted or remounted read-only, for example prior to system shutdown.


1

OP and I worked through this; see comments & chat for details. First, to find the problem process and location, this line in /etc/init/mountall-shell.conf /sbin/sulogin was changed to /usr/bin/ltrace -S -f -o /root/sulogin-ltrace.log /bin/sulogin Excerpt from log: 837 crypt("password", "x") = nil 837 strcmp(nil, "x" <no return ...> 837 --- ...


1

The default behaviour for most Linux file systems is to safeguard your data. When the kernel detects an error in the storage subsystem it will make the filesystem read-only to prevent (further) data corruption. You can tune this somewhat with the mount option errors={continue|remount-ro|panic} which are documented in the system manual (man mount). When ...


1

In addition to the searches recommended by terdon, you could also search by the folder name. So if someone deleted (or moved) the files using a wildcard, you may not find any of your filenames specified in any history file. For example, if someone did: $ cd /home/mydir $ rm * Or $ cd somewhere-else $ mv /home/mydir/* . You wouldn't find any of your ...


1

You can use dd to create copies of the partitions and not of all the device. dd if=/dev/sad1 of=/tmp/boot.img dd if=/dev/sad2 of=/tmp/root.img As for Q2b: I did this several times, never had a problem, but still this is not recommended.


1

Each underlying filesystem is assigned a precedence. If there are duplicate filenames, the one from the higher precedence filesystem is the visible one, the others are hidden. See http://superuser.com/questions/326190/how-does-unionfs-work


1

Try: for _file in *.csv do if ! grep -q 'HEADER' <(head -n 1 -- "$_file") then echo >&2 "ERROR: Missing HEADER record for $_file" # mv -- "$_file" "${_file%.*}.head" echo "$_file" "${_file%.*}.head" fi done Using echo line to verify if it works right, if everything ok, try mv line.


1

Mount them read-only, when possible, and the fsck won't be necessary. But you really need to be more specific (what partitions are you talking about? Were's just guessing without and fstab) and especially understand that things happen like that for a reason. E.g. sshd is on /usr and your user profile is on /home. Assuming these are separate partitions, ...


1

I believe that adding nobootwait to the fstab entries would work, but openbsd may not implement that. mountalll, used with Upstart, does. I think systemd does too.



Only top voted, non community-wiki answers of a minimum length are eligible